# Copyright (c) 2020 Dave Petzold (Appsfactory GmbH)
#
# This file is part of Project EHRbase
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.



*** Settings ***
Resource                ${EXECDIR}/robot/_resources/suite_settings.robot

Test Setup              generic.prepare new request session    Prefer=return=representation
...															   Authorization=${AUTHORIZATION['Authorization']}
Documentation           *NOTE:* The validation of error messages in the tables below depends on system language settings:\n\n
...                           Validation of English messages (if the system language is set to English), \n\n
...                           Validation of German messages (if the system language is set to German)
...						*Author:* Dave Petzold
Force Tags              observation_create    heart-rate    create


*** Variables ***




*** Test Cases ***

001 Create Heart Rate (valid variants)
	[Documentation]     1. *CREATE* new an EHR record\n\n 
	...                 2. *LOAD* _observation-example-heart-rate-robot.json_\n\n
	...                 3. *UPDATE* values for all attributes from the table with only valid values\n\n
    ...                 4. *POST* example JSON to observation endpoint\n\n
	...                 5. *VALIDATE* the response status \n\n
    ...                 6. *VALIDATE* outcome against diagnostic text
    [Tags]             valid
    [Template]         create Observation Heart Rate JSON

#|  resourceType   |          		ID   			|           meta         											|  	  status  	|                             									Identifier   						                            					  						                                                  |                      				category                           					        					|                                        									code          										                            	                                                                         |         subject                    |	  DateTime	   |                      			    	  valueQuantity  			           		            |  dataabsentreason  |  R.-Code  |  ArrayNumber |         				                                                                                                                        diagnostics 							                                                                        |
#|                 |                				|  available  | 			profile  								|          		|  available  |  			coding.system					|  		coding.code  	|  							     system  		   				  |   		  value  		   |    assigner    |       reference         |  available  |  codingavailable  |  				system  									   |    	 code       |  available  |  coding available  |  					0.system	  				|  		0.code	  |    0.display    |  				1.system  				|  		1.code	  |              1.display              |      text      |  available  |   Identifier-value   |                |  available  |		value	|    unit    	 |  			system      		   |    code    |                    |           |              |               				ENG								                                                                                      |                                           DE                                                            |
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		   abcd    	       Heart rate (observable entity)        Heart rate        true    		   valid      	      2020-02-25		  true		  ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               201           0    		                            ${EMPTY}                                                                                                               ${EMPTY}
    Observation    	        test  						true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://google.com						           	       test          https://google.com												       missing          	         true          abcd1234#!§$                true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4		   test1234          	http://google.com            		   missing   	   test1234                              test1234          true    		   valid      	      1990-12-30		  true		  ${10.12}	     Dave's	       	   http://unitsofmeasure.org    	   /min			 false               201           0    		                            ${EMPTY}                                                                                                               ${EMPTY}
    Observation    	        123456  					true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      missing										      	   test          missing        													   123te                         false         Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4		   missing          	missing                     		   364075005	   missing                               missing           true    		   valid      	      2025-01-01		  true		  ${150.38}	     test	           http://unitsofmeasure.org    	   /min			 false               201           0    		                            ${EMPTY}                                                                                                               ${EMPTY}
    Observation    	        missing 					true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			false     http://terminology.hl7.org/CodeSystem/v2-0203            missing       https://www.charite.de/fhir/CodeSystem/observation-identifiers        abcd                          true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4		   Heart rate          	http://snomed.info/sct         		   abcd    		   Heart rate (observable entity)        Heart rate        true    		   valid      	      2020-02-25		  true		  ${60}	         test	           http://unitsofmeasure.org    	   /min			 false               201           0    		                            ${EMPTY}                                                                                                               ${EMPTY}
#    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true         http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4		   Heart rate          	http://snomed.info/sct         		   abcd    		   Heart rate (observable entity)        Heart rate        true    		   valid      	      2020-02-25		  false		  ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 truevalid           201           0    		                            ${EMPTY}                                                                                                               ${EMPTY}


002 Create Heart Rate (invalid resourceType)
	[Documentation]     1. *CREATE* new an EHR record\n\n 
	...                 2. *LOAD* _observation-example-heart-rate-robot.json_\n\n
	...                 3. *UPDATE* values for all attributes from the table with only ``resourceType`` invalid\n\n
    ...                 4. *POST* example JSON to observation endpoint\n\n
	...                 5. *VALIDATE* the response status \n\n
    ...                 6. *VALIDATE* outcome against diagnostic text
    [Tags]             resourceType    invalid
    [Template]         create Observation Heart Rate JSON

#|  resourceType   |          		ID   			|           meta         											|  	  status  	|                             									Identifier   						                            					  						                                                  |                      				category                           					        					|                                        									code          										                            	                                                                         |         subject                    |	  DateTime	   |                      			    	  valueQuantity  			           		            |  dataabsentreason  |  R.-Code  |  ArrayNumber |         				                                                                                                                        diagnostics 							                                                                        |
#|                 |                				|  available  | 			profile  								|          		|  available  |  			coding.system					|  		coding.code  	|  							     system  		   				  |   		  value  		   |    assigner    |       reference         |  available  |  codingavailable  |  				system  									   |    	 code       |  available  |  coding available  |  					0.system	  				|  		0.code	  |    0.display    |  				1.system  				|  		1.code	  |              1.display              |      text      |  available  |   Identifier-value   |                |  available  |		value	|    unit    	 |  			system      		   |    code    |                    |           |              |               				ENG								                                                                                      |                                           DE                                                            |
    abcd         	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            test          https://www.charite.de/fhir/CodeSystem/observation-identifiers        abcd          	             true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         			 abcd    	   Heart rate (observable entity)        Heart rate        true    		   valid      		  2020-02-25		  true		  ${88.8}	     test	          http://unitsofmeasure.org    	       /min			 false               422           0    	 This does not appear to be a FHIR resource                                                                                                           Dies scheint keine FHIR-Ressource zu sein
    ${12345}    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            test          https://www.charite.de/fhir/CodeSystem/observation-identifiers        abcd          		         true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         			 abcd    	   Heart rate (observable entity)        Heart rate        true    		   valid      		  2020-02-25		  true		  ${88.8}	     test	          http://unitsofmeasure.org    	       /min			 false               422           0    	 This does not appear to be a FHIR resource                                                                                                           Dies scheint keine FHIR-Ressource zu sein
    missing      	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            test          https://www.charite.de/fhir/CodeSystem/observation-identifiers        abcd          		         true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         			 abcd    	   Heart rate (observable entity)        Heart rate        true    		   valid      		  2020-02-25		  true		  ${88.8}	     test	          http://unitsofmeasure.org    	       /min			 false               422           0    	 Unable to find resourceType property                                                                                                                 ResourceType-Property kann nicht gefunden werden
    ${EMPTY}    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            test          https://www.charite.de/fhir/CodeSystem/observation-identifiers        abcd          		         true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         			 abcd    	   Heart rate (observable entity)        Heart rate        true    		   valid      		  2020-02-25		  true		  ${88.8}	     test	          http://unitsofmeasure.org    	       /min			 false               422           0    	 This does not appear to be a FHIR resource                                                                                                           Dies scheint keine FHIR-Ressource zu sein


003 Create Heart Rate (invalid ID)
	[Documentation]     1. *CREATE* new an EHR record\n\n 
	...                 2. *LOAD* _observation-example-heart-rate-robot.json _\n\n
	...                 3. *UPDATE* values for all attributes from the table with only ``ID`` invalid\n\n
    ...                 4. *POST* example JSON to observation endpoint\n\n
	...                 5. *VALIDATE* the response status \n\n
    ...                 6. *VALIDATE* outcome against diagnostic text
    [Tags]             ID    invalid
    [Template]         create Observation Heart Rate JSON

#|  resourceType   |          		ID   			|           meta         											|  	  status  	|                             									Identifier   						                            					  						                                                  |                      				category                           					        					|                                        									code          										                            	                                                                         |         subject                    |	  DateTime	   |                      			    	  valueQuantity  			           		            |  dataabsentreason  |  R.-Code  |  ArrayNumber |         				                                                                                                                        diagnostics 							                                                                        |
#|                 |                				|  available  | 			profile  								|          		|  available  |  			coding.system					|  		coding.code  	|  							     system  		   				  |   		  value  		   |    assigner    |       reference         |  available  |  codingavailable  |  				system  									   |    	 code       |  available  |  coding available  |  					0.system	  				|  		0.code	  |    0.display    |  				1.system  				|  		1.code	  |              1.display              |      text      |  available  |   Identifier-value   |                |  available  |		value	|    unit    	 |  			system      		   |    code    |                    |           |              |               				ENG								                                                                                      |                                           DE                                                            |
    Observation    	        ${EMPTY}  					true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		   valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 @value cannot be empty                                                                                                                               @value kann nicht leer sein
    Observation    	        ${123456}  					true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		   valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.


004 Create Heart Rate (invalid Meta/Profile)
	[Documentation]     1. *CREATE* new an EHR record\n\n 
	...                 2. *LOAD* _observation-example-heart-rate-robot.json _\n\n
	...                 3. *UPDATE* values for all attributes from the table with only ``Meta`` invalid\n\n
    ...                 4. *POST* example JSON to observation endpoint\n\n
	...                 5. *VALIDATE* the response status \n\n
    ...                 6. *VALIDATE* outcome against diagnostic text
    [Tags]             Meta    Profile    invalid
    [Template]         create Observation Heart Rate JSON

#|  resourceType   |          		ID   			|           meta         											|  	  status  	|                             									Identifier   						                            					  						                                                  |                      				category                           					        					|                                        									code          										                            	                                                                         |         subject                    |	  DateTime	   |                      			    	  valueQuantity  			           		            |  dataabsentreason  |  R.-Code  |  ArrayNumber |         				                                                                                                                        diagnostics 							                                                                        |
#|                 |                				|  available  | 			profile  								|          		|  available  |  			coding.system					|  		coding.code  	|  							     system  		   				  |   		  value  		   |    assigner    |       reference         |  available  |  codingavailable  |  				system  									   |    	 code       |  available  |  coding available  |  					0.system	  				|  		0.code	  |    0.display    |  				1.system  				|  		1.code	  |              1.display              |      text      |  available  |   Identifier-value   |                |  available  |		value	|    unit    	 |  			system      		   |    code    |                    |           |              |               				ENG								                                                                                      |                                           DE                                                            |
# no meta
    Observation    	    	heart-rate  				false       https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Default profile is not supported for Observation. One of the following profiles is expected:                                                         Default profile is not supported for Observation. One of the following profiles is expected:
# invalid profile
    Observation    	    	heart-rate  				true        http://google.com								         final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Profile reference 'http://google.com' could not be resolved, so has not been checked                                                                 The resource does not contain any supported profile. One of the following profiles is expected:
    Observation    	    	heart-rate  				true        test											         final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Canonical URLs must be absolute URLs if they are not fragment references                                                                             Canonical URLs must be absolute URLs if they are not fragment references
    Observation    	    	heart-rate  				true        ${1234567890}        									 final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
    Observation    	    	heart-rate  				true        missing											         final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Default profile is not supported for Observation. One of the following profiles is expected:                                                         Default profile is not supported for Observation. One of the following profiles is expected:
    Observation    	    	heart-rate  				true        ${EMPTY}        										 final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 @value cannot be empty                                                                                                                               @value kann nicht leer sein


005 Create Heart Rate (invalid Status)
	[Documentation]     1. *CREATE* new an EHR record\n\n 
	...                 2. *LOAD* _observation-example-heart-rate-robot.json _\n\n
	...                 3. *UPDATE* values for all attributes from the table with only ``Status`` invalid\n\n
    ...                 4. *POST* example JSON to observation endpoint\n\n
	...                 5. *VALIDATE* the response status \n\n
    ...                 6. *VALIDATE* outcome against diagnostic text
    [Tags]             Status    invalid
    [Template]         create Observation Heart Rate JSON

#|  resourceType   |          		ID   			|           meta         											|  	  status  	|                             									Identifier   						                            					  						                                                  |                      				category                           					        					|                                        									code          										                            	                                                                         |         subject                    |	  DateTime	   |                      			    	  valueQuantity  			           		            |  dataabsentreason  |  R.-Code  |  ArrayNumber |         				                                                                                                                        diagnostics 							                                                                        |
#|                 |                				|  available  | 			profile  								|          		|  available  |  			coding.system					|  		coding.code  	|  							     system  		   				  |   		  value  		   |    assigner    |       reference         |  available  |  codingavailable  |  				system  									   |    	 code       |  available  |  coding available  |  					0.system	  				|  		0.code	  |    0.display    |  				1.system  				|  		1.code	  |              1.display              |      text      |  available  |   Identifier-value   |                |  available  |		value	|    unit    	 |  			system      		   |    code    |                    |           |              |               				ENG								                                                                                      |                                           DE                                                            |
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        todo			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               400           0    	 Unknown ObservationStatus code                                                                                                                       Unknown ObservationStatus code
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        ${123}			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        missing		true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Observation.status: minimum required = 1, but only found 0                                                                                           mindestens erforderlich = Observation.status, aber nur gefunden Observation.status
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        ${EMPTY}		true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           1    	 @value cannot be empty                                                                                                                               @value kann nicht leer sein


006 Create Heart Rate (invalid Identifier)
	[Documentation]     1. *CREATE* new an EHR record\n\n 
	...                 2. *LOAD* _observation-example-heart-rate-robot.json _\n\n
	...                 3. *UPDATE* values for all attributes from the table with only ``Identifier`` invalid\n\n
    ...                 4. *POST* example JSON to observation endpoint\n\n
	...                 5. *VALIDATE* the response status \n\n
    ...                 6. *VALIDATE* outcome against diagnostic text
    [Tags]             Identifier    invalid
    [Template]         create Observation Heart Rate JSON

#|  resourceType   |          		ID   			|           meta         											|  	  status  	|                             									Identifier   						                            					  						                                                  |                      				category                           					        					|                                        									code          										                            	                                                                         |         subject                    |	  DateTime	   |                      			    	  valueQuantity  			           		            |  dataabsentreason  |  R.-Code  |  ArrayNumber |         				                                                                                                                        diagnostics 							                                                                        |
#|                 |                				|  available  | 			profile  								|          		|  available  |  			coding.system					|  		coding.code  	|  							     system  		   				  |   		  value  		   |    assigner    |       reference         |  available  |  codingavailable  |  				system  									   |    	 code       |  available  |  coding available  |  					0.system	  				|  		0.code	  |    0.display    |  				1.system  				|  		1.code	  |              1.display              |      text      |  available  |   Identifier-value   |                |  available  |		value	|    unit    	 |  			system      		   |    code    |                    |           |              |               				ENG								                                                                                      |                                           DE                                                            |
# invalid Identifier Coding System
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      ${EMPTY}									               Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           1    	 @value cannot be empty                                                                                                                               @value kann nicht leer sein
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      test											           Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Coding.system must be an absolute reference, not a local reference                                                                                   Coding.system muss eine absolute Referenz sein, nicht eine lokale Referenz
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      ${1234}									 	           Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
# invalid Identifier Coding Code
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            ${EMPTY}      https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 @value cannot be empty                                                                                                                               @value kann nicht leer sein
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            ${12345}      https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
# invalid Identifier System
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          test															       8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Identifier.system must be an absolute reference, not a local reference                                                                               Identifier.system muss eine absolute Referenz sein, nicht eine lokale Referenz
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          ${12345}        												       8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          ${EMPTY}        													   8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 @value cannot be empty                                                                                                                               @value kann nicht leer sein
# invalid Identifier Value
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        ${EMPTY}                      true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 @value cannot be empty                                                                                                                               @value kann nicht leer sein
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        ${12345}       	             true          Organization/Charité        true             true            http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
# invalid Identifier Reference
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          missing                     true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           1    	 A Reference without an actual reference or identifier should have a display                                                                          Eine Referenz ohne eine tatsächliche Referenz oder einen Identifikator sollte eine Displaywert haben
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          ${12345}                    true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          ${EMPTY}                    true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           1    	 @value cannot be empty                                                                                                                               @value kann nicht leer sein


007 Create Heart Rate (invalid Category)
	[Documentation]     1. *CREATE* new an EHR record\n\n 
	...                 2. *LOAD* _observation-example-heart-rate-robot.json _\n\n
	...                 3. *UPDATE* values for all attributes from the table with only ``Categroy`` invalid\n\n
    ...                 4. *POST* example JSON to observation endpoint\n\n
	...                 5. *VALIDATE* the response status \n\n
    ...                 6. *VALIDATE* outcome against diagnostic text
    [Tags]             Category    invalid
    [Template]         create Observation Heart Rate JSON

#|  resourceType   |          		ID   			|           meta         											|  	  status  	|                             									Identifier   						                            					  						                                                  |                      				category                           					        					|                                        									code          										                            	                                                                         |         subject                    |	  DateTime	   |                      			    	  valueQuantity  			           		            |  dataabsentreason  |  R.-Code  |  ArrayNumber |         				                                                                                                                        diagnostics 							                                                                        |
#|                 |                				|  available  | 			profile  								|          		|  available  |  			coding.system					|  		coding.code  	|  							     system  		   				  |   		  value  		   |    assigner    |       reference         |  available  |  codingavailable  |  				system  									   |    	 code       |  available  |  coding available  |  					0.system	  				|  		0.code	  |    0.display    |  				1.system  				|  		1.code	  |              1.display              |      text      |  available  |   Identifier-value   |                |  available  |		value	|    unit    	 |  			system      		   |    code    |                    |           |              |               				ENG								                                                                                      |                                           DE                                                            |
# no category
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        false            true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Observation.category: minimum required = 1, but only found 0                                                                                         https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.category, aber nur gefunden Observation.category
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             false          http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Object must have some content                                                                                                                        Objekt muss einen Inhalt haben
# invalid Category System
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://google.com										          vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 This element does not match any known slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate                                 Dieses Element stimmt mit keinem bekannten Slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate überein.
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           test										                          vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 This element does not match any known slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate                                 Dieses Element stimmt mit keinem bekannten Slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate überein.
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           ${123456789}                                                       vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           missing													          vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           2    	 A code with no system has no defined meaning. A system should be provided                                                                            A code with no system has no defined meaning. A system should be provided
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           ${EMPTY}                                                           vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           3    	 @value cannot be empty                                                                                                                               @value kann nicht leer sein
# invalid Category Code
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         test               true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 This element does not match any known slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate                                 Dieses Element stimmt mit keinem bekannten Slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate überein.
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         ${12345}           true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         ${EMPTY}           true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd     	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           2    	 @value cannot be empty                                                                                                                               @value kann nicht leer sein
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         missing            true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 This element does not match any known slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate                                 Dieses Element stimmt mit keinem bekannten Slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate überein.


008 Create Heart Rate (invalid Code)
	[Documentation]     1. *CREATE* new an EHR record\n\n 
	...                 2. *LOAD* _observation-example-heart-rate-robot.json _\n\n
	...                 3. *UPDATE* values for all attributes from the table with only ``Code`` invalid\n\n
    ...                 4. *POST* example JSON to observation endpoint\n\n
	...                 5. *VALIDATE* the response status \n\n
    ...                 6. *VALIDATE* outcome against diagnostic text
    [Tags]             Code    invalid
    [Template]         create Observation Heart Rate JSON

#|  resourceType   |          		ID   			|           meta         											|  	  status  	|                             									Identifier   						                            					  						                                                  |                      				category                           					        					|                                        									code          										                            	                                                                         |         subject                    |	  DateTime	   |                      			    	  valueQuantity  			           		            |  dataabsentreason  |  R.-Code  |  ArrayNumber |         				                                                                                                                        diagnostics 							                                                                        |
#|                 |                				|  available  | 			profile  								|          		|  available  |  			coding.system					|  		coding.code  	|  							     system  		   				  |   		  value  		   |    assigner    |       reference         |  available  |  codingavailable  |  				system  									   |    	 code       |  available  |  coding available  |  					0.system	  				|  		0.code	  |    0.display    |  				1.system  				|  		1.code	  |              1.display              |      text      |  available  |   Identifier-value   |                |  available  |		value	|    unit    	 |  			system      		   |    code    |                    |           |              |               				ENG								                                                                                      |                                           DE                                                            |
# no code
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        false			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Observation.code: minimum required = 1, but only found 0                                                                                             https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.code, aber nur gefunden Observation.code
# no coding
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   false		  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 inimum required = 1, but only found 0                                                                                                                https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.code.coding, aber nur gefunden Observation.code.coding:HeartRateCode
# invalid Code Coding 0 System
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://google.com					  	8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 This element does not match any known slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate                                 Dieses Element stimmt mit keinem bekannten Slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate überein.
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				test            		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Coding.system must be an absolute reference, not a local reference                                                                                   Coding.system muss eine absolute Referenz sein, nicht eine lokale Referenz
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				${12345}         		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				${EMPTY}         		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           1    	 @value cannot be empty                                                                                                                               @value kann nicht leer sein
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				missing         		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 A code with no system has no defined meaning. A system should be provided                                                                            A code with no system has no defined meaning. A system should be provided
# invalid Code Coding 0 Code
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				test	       Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 This element does not match any known slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate                                 Dieses Element stimmt mit keinem bekannten Slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate überein.
    Observation    	   		heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				${12345}       Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				${EMPTY}       Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 @value cannot be empty                                                                                                                               @value kann nicht leer sein
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				missing	       Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 This element does not match any known slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate                                 Dieses Element stimmt mit keinem bekannten Slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate überein.
# invalid Code Coding 0 Display
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         ${12345}          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         ${EMPTY}          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 @value cannot be empty                                                                                                                               @value kann nicht leer sein
# invalid Code Coding 1 System
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	test	                     		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Coding.system must be an absolute reference, not a local reference                                                                                   Coding.system muss eine absolute Referenz sein, nicht eine lokale Referenz
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	${12345}                    		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	${EMPTY}         		                 abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 A code with no system has no defined meaning. A system should be provided                                                                            A code with no system has no defined meaning. A system should be provided
# invalid Code Coding 1 Code
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     ${12345}      Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     ${EMPTY}      Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 @value cannot be empty                                                                                                                               @value kann nicht leer sein
# invalid Code Coding 0 Display
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   ${12345}                              Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   ${EMPTY}                              Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 @value cannot be empty                                                                                                                               @value kann nicht leer sein
# invalid Code Text
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        ${12345}          true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        ${EMPTY}          true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 @value cannot be empty                                                                                                                               @value kann nicht leer sein


009 Create Heart Rate (invalid Subject)
	[Documentation]     1. *CREATE* new an EHR record\n\n 
	...                 2. *LOAD* _observation-example-heart-rate-robot.json _\n\n
	...                 3. *UPDATE* values for all attributes from the table with only ``Subject`` invalid\n\n
    ...                 4. *POST* example JSON to observation endpoint\n\n
	...                 5. *VALIDATE* the response status \n\n
    ...                 6. *VALIDATE* outcome against diagnostic text
    [Tags]             Subject    invalid
    [Template]         create Observation Heart Rate JSON

#|  resourceType   |          		ID   			|           meta         											|  	  status  	|                             									Identifier   						                            					  						                                                  |                      				category                           					        					|                                        									code          										                            	                                                                         |         subject                    |	  DateTime	   |                      			    	  valueQuantity  			           		            |  dataabsentreason  |  R.-Code  |  ArrayNumber |         				                                                                                                                        diagnostics 							                                                                        |
#|                 |                				|  available  | 			profile  								|          		|  available  |  			coding.system					|  		coding.code  	|  							     system  		   				  |   		  value  		   |    assigner    |       reference         |  available  |  codingavailable  |  				system  									   |    	 code       |  available  |  coding available  |  					0.system	  				|  		0.code	  |    0.display    |  				1.system  				|  		1.code	  |              1.display              |      text      |  available  |   Identifier-value   |                |  available  |		value	|    unit    	 |  			system      		   |    code    |                    |           |              |               				ENG								                                                                                      |                                           DE                                                            |
# no subject
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        false    	 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Observation.subject: minimum required = 1, but only found 0                                                                                          https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.subject, aber nur gefunden Observation.subject
# invalid reference
    # Deprecated Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	test      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 EhrId not found for subject 'test'                                                                                                                   EhrId not found for subject 'test'
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	${12345}     	  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
    # Deprecated: Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true             invalid      	  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 EhrId not found for subject                                                                                                                          EhrId not found for subject
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	${EMPTY}     	  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           2    	 All FHIR elements must have a @value                                                                                                                 All FHIR elements must have a @value
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	missing      	  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Subject identifier is required                                                                                                                       Subject identifier is required


010 Create Heart Rate (invalid DateTime)
	[Documentation]     1. *CREATE* new an EHR record\n\n 
	...                 2. *LOAD* _observation-example-heart-rate-robot.json _\n\n
	...                 3. *UPDATE* values for all attributes from the table with only ``DateTime`` invalid\n\n
    ...                 4. *POST* example JSON to observation endpoint\n\n
	...                 5. *VALIDATE* the response status \n\n
    ...                 6. *VALIDATE* outcome against diagnostic text
    [Tags]             DateTime    invalid
    [Template]         create Observation Heart Rate JSON

#|  resourceType   |          		ID   			|           meta         											|  	  status  	|                             									Identifier   						                            					  						                                                  |                      				category                           					        					|                                        									code          										                            	                                                                         |         subject                    |	  DateTime	   |                      			    	  valueQuantity  			           		            |  dataabsentreason  |  R.-Code  |  ArrayNumber |         				                                                                                                                        diagnostics 							                                                                        |
#|                 |                				|  available  | 			profile  								|          		|  available  |  			coding.system					|  		coding.code  	|  							     system  		   				  |   		  value  		   |    assigner    |       reference         |  available  |  codingavailable  |  				system  									   |    	 code       |  available  |  coding available  |  					0.system	  				|  		0.code	  |    0.display    |  				1.system  				|  		1.code	  |              1.display              |      text      |  available  |   Identifier-value   |                |  available  |		value	|    unit    	 |  			system      		   |    code    |                    |           |              |               				ENG								                                                                                      |                                           DE                                                            |
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  202-02-25		      true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           1    	 is outside the range of reasonable years - check for data entry error                                                                                liegt außerhalb des Bereichs vernünftiger Jahre - Prüfung auf Dateneingabefehler
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-13-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           1    	 Not a valid date/time                                                                                                                                Kein gültiges Datum/Uhrzeit 
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-32		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           1    	 Not a valid date/time                                                                                                                                Kein gültiges Datum/Uhrzeit 
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  ${EMPTY}		      true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           2    	 @value cannot be empty                                                                                                                               @value kann nicht leer sein
    Observation     	    heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  missing  		      true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 minimum required = 1, but only found 0                                                                                                               https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.effective


011 Create Heart Rate (invalid valueQuantity)
	[Documentation]     1. *CREATE* new an EHR record\n\n 
	...                 2. *LOAD* _observation-example-heart-rate-robot.json _\n\n
	...                 3. *UPDATE* values for all attributes from the table with only ``valueQuantity`` invalid\n\n
    ...                 4. *POST* example JSON to observation endpoint\n\n
	...                 5. *VALIDATE* the response status \n\n
    ...                 6. *VALIDATE* outcome against diagnostic text
    [Tags]             valueQuantity    invalid    not-ready_parallel_fail    not-ready    247
    [Template]         create Observation Heart Rate JSON

#|  resourceType   |          		ID   			|           meta         											|  	  status  	|                             									Identifier   						                            					  						                                                  |                      				category                           					        					|                                        									code          										                            	                                                                         |         subject                    |	  DateTime	   |                      			    	  valueQuantity  			           		            |  dataabsentreason  |  R.-Code  |  ArrayNumber |         				                                                                                                                        diagnostics 							                                                                        |
#|                 |                				|  available  | 			profile  								|          		|  available  |  			coding.system					|  		coding.code  	|  							     system  		   				  |   		  value  		   |    assigner    |       reference         |  available  |  codingavailable  |  				system  									   |    	 code       |  available  |  coding available  |  					0.system	  				|  		0.code	  |    0.display    |  				1.system  				|  		1.code	  |              1.display              |      text      |  available  |   Identifier-value   |                |  available  |		value	|    unit    	 |  			system      		   |    code    |                    |           |              |               				ENG								                                                                                      |                                           DE                                                            |
# no valueQuantity & no dataabsentreason
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  false		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 If there is no component or hasMember element then either a value                                                                                    If there is no component or hasMember element then either a value
# invalid value
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88888.8}    pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 value is not within interval, expected:0.0 <= 88888.8 < 1000.0                                                                                       value is not within interval, expected:0.0 <= 88888.8 < 1000.0
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${-10}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 value is not within interval, expected:0.0 <= -10.0 < 1000.0                                                                                         value is not within interval, expected:0.0 <= -10.0 < 1000.0
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${EMPTY}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a number                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss eine Zahl sein.
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   test  	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a number                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss eine Zahl sein.
    Observation     	    heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   missing	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           1    	 minimum required = 1, but only found 0                                                                                                               https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.value
# invalid unit
    Observation     	    heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     ${12345}	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
    Observation     	    heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     ${EMPTY}	       http://unitsofmeasure.org    	   /min			 false               422           1    	 @value cannot be empty                                                                                                                               @value kann nicht leer sein
    Observation     	    heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     missing	       http://unitsofmeasure.org    	   /min			 false               422           1    	 minimum required = 1, but only found 0                                                                                                               https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.value
# invalid system
    Observation      	    heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://google.com	         	   /min			 false               422           1    	 Value is 'http://google.com' but must be                                                                                                             Der Wert ist 
    Observation    	    	heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       test                         	   /min			 false               422           1    	 Coding.system must be an absolute reference, not a local reference                                                                                   Coding.system muss eine absolute Referenz sein, nicht eine lokale Referenz
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       ${12345}                      	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       ${EMPTY}                      	   /min			 false               422           1    	 A code with no system has no defined meaning. A system should be provided                                                                            A code with no system has no defined meaning. A system should be provided
    Observation      	    heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       missing                      	   /min			 false               422           1    	 If a code for the unit is present, the system SHALL also be present                                                                                  If a code for the unit is present, the system SHALL also be present
# invalid code
    Observation     	    heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   test			 false               422           1    	 Value is                                                                                                                                             Der Wert ist 
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   ${12345}      false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                             Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
    Observation      	    heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   ${EMPTY}		 false               422           1    	 @value cannot be empty                                                                                                                               @value kann nicht leer sein
    Observation      	    heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   missing		 false               422           1    	 minimum required = 1, but only found 0                                                                                                               https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.value
    [Teardown]          TRACE GITHUB ISSUE  247  bug

012 Create Heart Rate (invalid DataAbsentReason)
	[Documentation]     1. *CREATE* new an EHR record\n\n 
	...                 2. *LOAD* _observation-example-heart-rate-robot.json _\n\n
	...                 3. *UPDATE* values for all attributes from the table with only ``DataAbsentReason`` invalid\n\n
    ...                 4. *POST* example JSON to observation endpoint\n\n
	...                 5. *VALIDATE* the response status \n\n
    ...                 6. *VALIDATE* outcome against diagnostic text
    [Tags]             DataAbsentReason    invalid
    [Template]         create Observation Heart Rate JSON

#|  resourceType   |          		ID   			|           meta         											|  	  status  	|                             									Identifier   						                            					  						                                                  |                      				category                           					        					|                                        									code          										                            	                                                                         |         subject                    |	  DateTime	   |                      			    	  valueQuantity  			           		            |  dataabsentreason  |  R.-Code  |  ArrayNumber |         				                                                                                                                        diagnostics 							                                                                        |
#|                 |                				|  available  | 			profile  								|          		|  available  |  			coding.system					|  		coding.code  	|  							     system  		   				  |   		  value  		   |    assigner    |       reference         |  available  |  codingavailable  |  				system  									   |    	 code       |  available  |  coding available  |  					0.system	  				|  		0.code	  |    0.display    |  				1.system  				|  		1.code	  |              1.display              |      text      |  available  |   Identifier-value   |                |  available  |		value	|    unit    	 |  			system      		   |    code    |                    |           |              |               				ENG								                                                                                      |                                           DE                                                            |
# DataAbsentReason and  valueQuantity
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 truevalid           422           0    	 dataAbsentReason SHALL only be present if Observation.value                                                                                          ${EMPTY}
# invalid DataAbsentReason
#    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  false		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 truevalid           422           0    	 dataAbsentReason SHALL only be present if Observation.value                                                                                          ${EMPTY}


013 Create Heart Rate (invalid multi)
	[Documentation]     1. *CREATE* new an EHR record\n\n 
	...                 2. *LOAD* _observation-example-heart-rate-robot.json _\n\n
	...                 3. *UPDATE* values for all attributes from the table with multible invalid values \n\n
    ...                 4. *POST* example JSON to observation endpoint\n\n
	...                 5. *VALIDATE* the response status \n\n
    ...                 6. *VALIDATE* outcome against diagnostic text
    [Tags]             invalid    multi
    [Template]         create Observation Heart Rate JSON

#|  resourceType   |          		ID   			|           meta         											|  	  status  	|                             									Identifier   						                            					  						                                                  |                      				category                           					        					|                                        									code          										                            	                                                                         |         subject                    |	  DateTime	   |                      			    	  valueQuantity  			           		            |  dataabsentreason  |  R.-Code  |  ArrayNumber |         				                                                                                                                        diagnostics 							                                                                        |
#|                 |                				|  available  | 			profile  								|          		|  available  |  			coding.system					|  		coding.code  	|  							     system  		   				  |   		  value  		   |    assigner    |       reference         |  available  |  codingavailable  |  				system  									   |    	 code       |  available  |  coding available  |  					0.system	  				|  		0.code	  |    0.display    |  				1.system  				|  		1.code	  |              1.display              |      text      |  available  |   Identifier-value   |                |  available  |		value	|    unit    	 |  			system      		   |    code    |                    |           |              |               				ENG								                                                                                      |                                           DE                                                            |
# all attributes invalid for valueQuantity
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${EMPTY}	     ${EMPTY}	       ${EMPTY}    	                     ${EMPTY}		 false               422           2    	 @value cannot be empty                                                                                                                                @value kann nicht leer sein
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   test	         ${1234}	       test      	                     ${1234}		 false               422           2    	 Error parsing JSON: the primitive value must be a string                                                                                              Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   missing	     ${EMPTY}	       http://google.com                 test   		 false               422           2    	 All FHIR elements must have a @value or childre                                                                                                       All FHIR elements must have a @value or childre
     Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${EMPTY}	     ${1234}	       missing 	                         test   		 false               422           3    	 If a code for the unit is present, the system SHALL also be present                                                                                   If a code for the unit is present, the system SHALL also be present
# all attributes invalid for code 
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				${EMPTY}             	  			    ${EMPTY}       ${EMPTY}          	${EMPTY}         		              ${EMPTY}    	   ${EMPTY}                              ${EMPTY}          true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           6    	 @value cannot be empty                                                                                                                                @value kann nicht leer sein
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://google.com		  				${12345}       missing          	test                         		  missing    	   ${12345}                              missing           true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           5    	 minimum required = 1, but only found 0                                                                                                                https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.code.coding, aber nur gefunden Observation.code.coding:HeartRateCode
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				test            		  				missing        ${12345}          	${12345}                     		  missing    	   test12345                             ${EMPTY}          true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           8    	 minimum required = 1, but only found 0                                                                                                                https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.code.coding, aber nur gefunden Observation.code.coding:HeartRateCode
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				missing         		  				test           test1234          	${12345}                    	      ${EMPTY}    	   missing                               ${12345}          true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           8    	 minimum required = 1, but only found 0                                                                                                                https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.code.coding, aber nur gefunden Observation.code.coding:HeartRateCode
# all attributes invalid for category
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           http://google.com                                                  test               true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 This element does not match any known slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate                                  Dieses Element stimmt mit keinem bekannten Slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate überein.
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           missing                                                            ${EMPTY}           true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           1    	 minimum required = 1, but only found 0                                                                                                                https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.category, aber nur gefunden Observation.category:VSCat
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           ${EMPTY}                                                           ${12345}           true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           4    	 @value cannot be empty                                                                                                                                @value kann nicht leer sein
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           ${12345}                                                           missing            true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           0    	 Error parsing JSON: the primitive value must be a string                                                                                              Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein.
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      http://terminology.hl7.org/CodeSystem/v2-0203            Dave          https://www.charite.de/fhir/CodeSystem/observation-identifiers        8867-4_HeartRate              true          Organization/Charité        true             true           test                                                               ${EMPTY}           true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           1    	 minimum required = 1, but only found 0                                                                                                                https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.category, aber nur gefunden Observation.category:VSCat
# all attributes invalid for identifier
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      ${1234}                                                missing         ${EMPTY}                                                              ${EMPTY}                      true          ${1234}                     true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           5    	 @value cannot be empty                                                                                                                                @value kann nicht leer sein
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      ${EMPTY}                                               ${EMPTY}        ${1234}                                                               missing                       false         Organization/Charité        true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           4    	 @value cannot be empty                                                                                                                                @value kann nicht leer sein
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      missing                                                ${12345}        test                                                                  ${EMPTY}                      true          ${1234}                     true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           4    	 @value cannot be empty                                                                                                                                @value kann nicht leer sein
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      ${EMPTY}                                               ${EMPTY}        ${EMPTY}                                                              ${EMPTY}                      true          ${EMPTY}                    true             true           http://terminology.hl7.org/CodeSystem/observation-category         vital-signs        true			   true			  				http://loinc.org		  				8867-4         Heart rate          	http://snomed.info/sct         		     abcd    	   Heart rate (observable entity)        Heart rate        true    		 	valid      		  2020-02-25		  true		   ${88.8}	     pro Minute	       http://unitsofmeasure.org    	   /min			 false               422           6    	 @value cannot be empty                                                                                                                                @value kann nicht leer sein
# mix invalid attributes
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      test                                                   ${1234}         ${1234}                                                               ${1234}                       true          ${1234}                     true             true           ${1234}                                                            ${1234}            true			   true			  				${1234}          		  				${1234}        ${1234}          	${1234}                      		   ${1234}         ${1234}                               ${1234}           true    		 	valid      		  2020-02-25		  true		   test  	     ${1234}	       ${1234}                      	 ${1234}		 false               422          30    	 Value is '1234' but must be '/min'                                                                                                                    Wert ist
    ${1234}      	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      test                                                   ${1234}         ${1234}                                                               ${1234}                       true          ${1234}                     true             true           ${1234}                                                            ${1234}            true			   true			  				${1234}          		  				${1234}        ${1234}          	${1234}                      		   ${1234}         ${1234}                               ${1234}           true    		 	valid      		  2020-02-25		  true		   test  	     ${1234}	       ${1234}                      	 ${1234}		 false               422           0    	 This does not appear to be a FHIR resource                                                                                                            Dies scheint keine FHIR-Ressource zu sein
    Observation    	        ${1234}      				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      test                                                   ${1234}         ${1234}                                                               ${1234}                       true          ${1234}                     true             true           ${1234}                                                            ${1234}            true			   true			  				${1234}          		  				${1234}        ${1234}          	${1234}                      		   ${1234}         ${1234}                               ${1234}           true    		 	valid      		  2020-02-25		  true		   test  	     ${1234}	       ${1234}                      	 ${1234}		 false               422          31    	 Value is '1234' but must be '/min'                                                                                                                    Wert ist
    Observation    	        heart-rate  				false       https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final			true      test                                                   ${1234}         ${1234}                                                               ${1234}                       true          ${1234}                     true             true           ${1234}                                                            ${1234}            true			   true			  				${1234}          		  				${1234}        ${1234}          	${1234}                      		   ${1234}         ${1234}                               ${1234}           true    		 	valid      		  2020-02-25		  true		   test  	     ${1234}	       ${1234}                      	 ${1234}		 false               422          23    	 The value 'test' is not a valid decimal                                                                                                               ist kein gültiger Dezimalwert.
    Observation    	        heart-rate  				true        ${1234}                                                  final			true      test                                                   ${1234}         ${1234}                                                               ${1234}                       true          ${1234}                     true             true           ${1234}                                                            ${1234}            true			   true			  				${1234}          		  				${1234}        ${1234}          	${1234}                      		   ${1234}         ${1234}                               ${1234}           true    		 	valid      		  2020-02-25		  true		   test  	     ${1234}	       ${1234}                      	 ${1234}		 false               422          26    	 Profile reference '1234' has not been checked because it is unknown                                                                                   konnte nicht aufgelöst werden, wurde also nicht überprüft
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        ${1234}		true      test                                                   ${1234}         ${1234}                                                               ${1234}                       true          ${1234}                     true             true           ${1234}                                                            ${1234}            true			   true			  				${1234}          		  				${1234}        ${1234}          	${1234}                      		   ${1234}         ${1234}                               ${1234}           true    		 	valid      		  2020-02-25		  true		   test  	     ${1234}	       ${1234}                      	 ${1234}		 false               422          31    	 Value is '1234' but must be '/min'                                                                                                                    Wert ist
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final  		false     test                                                   ${1234}         ${1234}                                                               ${1234}                       true          ${1234}                     true             true           ${1234}                                                            ${1234}            true			   true			  				${1234}          		  				${1234}        ${1234}          	${1234}                      		   ${1234}         ${1234}                               ${1234}           true    		 	valid      		  2020-02-25		  true		   test  	     ${1234}	       ${1234}                      	 ${1234}		 false               422          24    	 Value is '1234' but must be '/min'                                                                                                                    Wert ist
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final  		true      test                                                   ${1234}         ${1234}                                                               ${1234}                       false         ${1234}                     true             true           ${1234}                                                            ${1234}            true			   true			  				${1234}          		  				${1234}        ${1234}          	${1234}                      		   ${1234}         ${1234}                               ${1234}           true    		 	valid      		  2020-02-25		  true		   test  	     ${1234}	       ${1234}                      	 ${1234}		 false               422          29    	 Value is '1234' but must be '/min'                                                                                                                    Wert ist
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final  		true      test                                                   ${1234}         ${1234}                                                               ${1234}                       true          ${1234}                     false            true           ${1234}                                                            ${1234}            true			   true			  				${1234}          		  				${1234}        ${1234}          	${1234}                      		   ${1234}         ${1234}                               ${1234}           true    		 	valid      		  2020-02-25		  true		   test  	     ${1234}	       ${1234}                      	 ${1234}		 false               422          27    	 Value is '1234' but must be '/min'                                                                                                                    Wert ist
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final  		true      test                                                   ${1234}         ${1234}                                                               ${1234}                       true          ${1234}                     true             false          ${1234}                                                            ${1234}            true			   true			  				${1234}          		  				${1234}        ${1234}          	${1234}                      		   ${1234}         ${1234}                               ${1234}           true    		 	valid      		  2020-02-25		  true		   test  	     ${1234}	       ${1234}                      	 ${1234}		 false               422          28    	 Value is '1234' but must be '/min'                                                                                                                    Wert ist
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final  		true      test                                                   ${1234}         ${1234}                                                               ${1234}                       true          ${1234}                     true             true           ${1234}                                                            ${1234}            false			   true			  				${1234}          		  				${1234}        ${1234}          	${1234}                      		   ${1234}         ${1234}                               ${1234}           true    		 	valid      		  2020-02-25		  true		   test  	     ${1234}	       ${1234}                      	 ${1234}		 false               422          19    	 Value is '1234' but must be '/min'                                                                                                                    Wert ist
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final  		true      test                                                   ${1234}         ${1234}                                                               ${1234}                       true          ${1234}                     true             true           ${1234}                                                            ${1234}            true			   false			  			${1234}          		  				${1234}        ${1234}          	${1234}                      		   ${1234}         ${1234}                               ${1234}           true    		 	valid      		  2020-02-25		  true		   test  	     ${1234}	       ${1234}                      	 ${1234}		 false               422          20    	 Value is '1234' but must be '/min'                                                                                                                    Wert ist
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final  		true      test                                                   ${1234}         ${1234}                                                               ${1234}                       true          ${1234}                     true             true           ${1234}                                                            ${1234}            true			   true 			  			${1234}          		  				${1234}        ${1234}          	${1234}                      		   ${1234}         ${1234}                               ${1234}           false    	 	valid      		  2020-02-25		  true		   test  	     ${1234}	       ${1234}                      	 ${1234}		 false               422          31    	 Value is '1234' but must be '/min'                                                                                                                    Wert ist
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final  		true      test                                                   ${1234}         ${1234}                                                               ${1234}                       true          ${1234}                     true             true           ${1234}                                                            ${1234}            true			   false			  			${1234}          		  				${1234}        ${1234}          	${1234}                      		   ${1234}         ${1234}                               ${1234}           true    		 	test      		  2020-02-25		  true		   test  	     ${1234}	       ${1234}                      	 ${1234}		 false               422          20    	 Value is '1234' but must be '/min'                                                                                                                    Wert ist
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final  		true      test                                                   ${1234}         ${1234}                                                               ${1234}                       true          ${1234}                     true             true           ${1234}                                                            ${1234}            true			   false			  			${1234}          		  				${1234}        ${1234}          	${1234}                      		   ${1234}         ${1234}                               ${1234}           true    		 	valid      		  ${12345}		      true		   test  	     ${1234}	       ${1234}                      	 ${1234}		 false               422          25    	 Value is '1234' but must be '/min'                                                                                                                    Wert ist
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final  		true      test                                                   ${1234}         ${1234}                                                               ${1234}                       true          ${1234}                     true             true           ${1234}                                                            ${1234}            true			   false			  			${1234}          		  				${1234}        ${1234}          	${1234}                      		   ${1234}         ${1234}                               ${1234}           true    		 	valid      		  2020-02-25		  false		   test  	     ${1234}	       ${1234}                      	 ${1234}		 false               422          12    	 minimum required = 1, but only found 0                                                                                                                https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.code.coding, aber nur gefunden Observation.code.coding:HeartRateCode
    Observation    	        heart-rate  				true        https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate        final  		true      test                                                   ${1234}         ${1234}                                                               ${1234}                       true          ${1234}                     true             true           ${1234}                                                            ${1234}            true			   false			  			${1234}          		  				${1234}        ${1234}          	${1234}                      		   ${1234}         ${1234}                               ${1234}           true    		 	valid      		  2020-02-25		  true		   test  	     ${1234}	       ${1234}                      	 ${1234}		 true                422          21    	 Value is '1234' but must be '/min'                                                                                                                    Wert ist


*** Keywords ***

# oooo    oooo oooooooooooo oooooo   oooo oooooo   oooooo     oooo   .oooooo.   ooooooooo.   oooooooooo.    .oooooo..o
# `888   .8P'  `888'     `8  `888.   .8'   `888.    `888.     .8'   d8P'  `Y8b  `888   `Y88. `888'   `Y8b  d8P'    `Y8
#  888  d8'     888           `888. .8'     `888.   .8888.   .8'   888      888  888   .d88'  888      888 Y88bo.
#  88888[       888oooo8       `888.8'       `888  .8'`888. .8'    888      888  888ooo88P'   888      888  `"Y8888o.
#  888`88b.     888    "        `888'         `888.8'  `888.8'     888      888  888`88b.     888      888      `"Y88b
#  888  `88b.   888       o      888           `888'    `888'      `88b    d88'  888  `88b.   888     d88' oo     .d8P
# o888o  o888o o888ooooood8     o888o           `8'      `8'        `Y8bood8P'  o888o  o888o o888bood8P'   8""88888P'
#
# [ HIGH LEVEL KEYWORDS ]


create Observation Heart Rate JSON
    [Arguments]         ${resourceType}    ${ID}    ${meta}    ${profile}    ${status}     ${Identifieravailable}
    ...                 ${Identifiercodingsystem}    ${Identifiercodingcode}    ${Identifiersystem}
    ...                 ${Identifiervalue}    ${Identifierassigner}    ${Identifierreference}
    ...                 ${categoryavailable}    ${categorycodingavailable}    ${categorysystem}    ${categorycode}
    ...                 ${codeavailable}    ${codecodingavailable}    ${code0system}    ${code0code}    ${code0display}
    ...                 ${code1system}    ${code1code}    ${code1display}    ${codetext}    ${subject}    ${subjectvalue}
    ...                 ${effectivedatetime}    ${vQavailable}    ${vQvalue}    ${vQunit}    ${vQsystem}    ${vQcode}
    ...                 ${dataabsentreason}    ${responsecode}    ${diagnosticINDEX}    ${diagnosticsENG}    ${diagnosticsDE}

                        prepare new request session    Prefer=return=representation

    &{resp}             Run Keywords
                        ...    ehr.create new ehr               000_ehr_status.json                             AND
                        ...    load JSON                        observation-example-heart-rate-robot.json       AND
                        ...    update Resource Type             ${resourceType}                                 AND
                        ...    update ID                        ${ID}                                           AND
                        ...    update Meta Profile              ${meta}                                         ${profile}                     AND
                        ...    update Status                    ${status}                                       AND
                        ...    update Identifier                ${Identifieravailable}                          ${Identifiercodingsystem}      ${Identifiercodingcode}     ${Identifiersystem}     ${Identifiervalue}      ${Identifierassigner}    ${Identifierreference}    AND
                        ...    update Category                  ${categoryavailable}                            ${categorycodingavailable}     ${categorysystem}           ${categorycode}         AND
                        ...    update Code                      ${codeavailable}                                ${codecodingavailable}         ${code0system}              ${code0code}            ${code0display}         ${code1system}           ${code1code}             ${code1display}    ${codetext}    AND
                        ...    update Subject                   ${subject}                                      ${subjectvalue}                AND
                        ...    update Effective Date Time       ${effectivedatetime}                            AND
                        ...    update Value Quantity            ${vQavailable}                                  ${vQvalue}                     ${vQunit}                   ${vQsystem}            ${vQcode}                AND
                        ...    update Data Absent Reason        ${dataabsentreason}                             AND
                        ...    POST    ${BASE_URL}/Observation    body=${payload}                               AND
                        ...    Output Debug Info To Console                                                     AND
                        ...    validation JSON                  ${responsecode}                                 ${diagnosticINDEX}             ${diagnosticsENG}           ${diagnosticsDE}
